interface FetchAppointmentListAPIResData {
  code: number
  msg: string
  time: string
  data: {
    data: Appointment[]
    current_page: number
    total: number
    per_page: number
    last_page: number
  }
}

interface FetchAppointmentListAPIParams {
  page: string
  limit: string
  status?: string // 空 全部 1 未到店 2 已到店 3 已取消
}

export function fetchAppointmentListAPI(params: FetchAppointmentListAPIParams, token: string) {
  return httpInstance.get<FetchAppointmentListAPIResData, FetchAppointmentListAPIParams>(
    '/api/reserve_order/index',
    { params, headers: { token } },
  )
}
